1 Introduction

This wind analysis was inspired by Munch and Conover (2000), who found a correlation between wind speed and coastwide YOY index. The wind measurements used are described below:

The NOAA environmental buoy array provided environmental data from 1970 to 1992. Buoys collected hourly records of windspeed and wind direction at a height of 10 m, and surface temperature at a depth of 1.5 m. Data were examined from a total of 34 buoys in fixed locations throughout the region from Cape Fear to the Gulf of Maine and extending from nearshore to beyond the shelf break. Buoy locations are reported in Munch (1997).

Spring-spawned YOY were apparently characterized as fish between 13-27cm in length in the autumn bottom trawl, but “A complete set of length-frequency distributions and cohort designations is presented in Munch (1997)”.

And the observed correlation is described:

A strong relationship existed between offshore wind and recruitment. Using north (n) and east (e) windstress components from NOAA buoys near the edge of the shelf of the Mid-Atlantic Bight, the model ln(c.p.u.e.) = -16.5 n - 12.8 e + 0.59 (p<0.05) explained 36% of the variance in spring cohort abundance in the SNE region

I am trying to obtain a copy of Munch (1997), which is a master’s thesis (Munch, S. B. 1997. Recruitment Dynamics of Bluefish, Pomatonus saltatrix, on the continental shelf from Cape Fear to Cape Cod, 1973–1995. M.S. Thesis. State University of New York at Stony Brook).

2 Determine relevant strata

2.1 What polygons to use?

Entire east coast:

Inshore (ish) strata:

All strata south of ~ Cape Cod

3 Daily data

3.1 Downloaded daily mean dataset (uwind, vwind) from NOAA PSL

Located in data-raw folder.

3.2 Extract mean wind by day

3.2.1 v wind

3.2.1.1 Read in wind data

# use ecopull function
devtools::install_github("kimberly-bastille/ecopull")
vwind <- ecopull::nc_to_raster(nc = here::here("data-raw/vwnd.10m.2021.nc"),
                               varname = "vwnd",
                               show_images = TRUE) 

vwind <- raster::rotate(vwind)
raster::plot(vwind)

3.2.1.2 Mask to relevant strata

m_vwind <- raster::mask(x = vwind, 
                        mask = new_shape[new_shape$STRATA > 2000 & 
                                           new_shape$STRATA < 8000,2])
mean(m_vwind@data@values, na.rm = TRUE)
## [1] -0.9522257
m_vwind[[1]]
## class      : RasterLayer 
## dimensions : 30, 20, 600  (nrow, ncol, ncell)
## resolution : 1.031519, 0.6498195  (x, y)
## extent     : -80.45845, -59.82808, 30.21661, 49.71119  (xmin, xmax, ymin, ymax)
## crs        : +proj=longlat +lat_0=40 +lon_0=-77 +x_0=0 +y_0=0 +datum=NAD83 +no_defs +ellps=GRS80 +towgs84=0,0,0 
## source     : memory
## names      : X2021.01.01 
## values     : 0.747654, 8.843357  (min, max)
## time       : 2021-01-01
raster::plot(m_vwind)

3.2.1.2.1 Plot over map

Seems like the existing strata are too small, try masking to more strata.

3.2.1.3 Mask to different strata

m_vwind2 <- raster::mask(x = vwind, 
                        mask = large_geom)
mean(m_vwind2@data@values, na.rm = TRUE)
## [1] -0.9731909
m_vwind2[[1]]
## class      : RasterLayer 
## dimensions : 30, 20, 600  (nrow, ncol, ncell)
## resolution : 1.031519, 0.6498195  (x, y)
## extent     : -80.45845, -59.82808, 30.21661, 49.71119  (xmin, xmax, ymin, ymax)
## crs        : +proj=longlat +lat_0=40 +lon_0=-77 +x_0=0 +y_0=0 +datum=NAD83 +no_defs +ellps=GRS80 +towgs84=0,0,0 
## source     : memory
## names      : X2021.01.01 
## values     : 0.1705055, 8.967381  (min, max)
## time       : 2021-01-01
raster::plot(m_vwind2)

3.2.1.3.1 Plot over map

This seems like a better geometry.

3.2.2 u wind

3.2.2.1 Read in wind data

# use ecopull function
devtools::install_github("kimberly-bastille/ecopull")
uwind <- ecopull::nc_to_raster(nc = here::here("data-raw/uwnd.10m.2021.nc"),
                               varname = "uwnd",
                               show_images = TRUE) 

uwind <- raster::rotate(uwind)
raster::plot(uwind)

3.2.2.2 Mask to strata

m_uwind2 <- raster::mask(x = uwind, 
                        mask = large_geom)
mean(m_uwind2@data@values, na.rm = TRUE)
## [1] 1.321539
m_uwind2[[1]]
## class      : RasterLayer 
## dimensions : 30, 20, 600  (nrow, ncol, ncell)
## resolution : 1.031519, 0.6498195  (x, y)
## extent     : -80.45845, -59.82808, 30.21661, 49.71119  (xmin, xmax, ymin, ymax)
## crs        : +proj=longlat +lat_0=40 +lon_0=-77 +x_0=0 +y_0=0 +datum=NAD83 +no_defs +ellps=GRS80 +towgs84=0,0,0 
## source     : memory
## names      : X2021.01.01 
## values     : 1.038357, 7.00613  (min, max)
## time       : 2021-01-01
raster::plot(m_uwind2)

3.2.2.2.1 Plot over map

3.2.3 Calculate weekly mean u and v wind

3.2.3.1 v wind

Break into north and south regions at 39N (approximately the bottom of NJ)

Positive v wind = wind is blowing to the north

##         names         mean_wind            min_wind          max_wind
## 1 X2021.01.01  8.67782974243164    8.32382583618164  8.96738052368164
## 2 X2021.01.02 0.727199292182922 -0.0607889890670776  1.43823444843292
## 3 X2021.01.03    2.053333568573      1.762610912323    2.250892162323
## 4 X2021.01.04 0.892561662197113   -1.19894230365753  2.63406562805176
## 5 X2021.01.05 -4.73075468540192   -6.87157487869263 -2.68505167961121
## 6 X2021.01.06  2.14590229988098    1.55810940265656  2.86865615844727
##         names          mean_wind          min_wind            max_wind
## 1 X2021.01.01   4.19205500284831 0.170505523681641    8.33652114868164
## 2 X2021.01.02  -2.03624478975932 -3.27465629577637 0.00757038593292236
## 3 X2021.01.03   1.81625674565633 0.796790599822998      2.449134349823
## 4 X2021.01.04   3.93146146138509  1.99344062805176    5.49441719055176
## 5 X2021.01.05  -1.92808553377787 -3.53368449211121  -0.494621992111206
## 6 X2021.01.06 -0.980953073501587 -5.24364852905273    1.50732815265656

3.2.3.2 u wind

Positive u wind = wind is blowing to the east

##         names         mean_wind           min_wind          max_wind
## 1 X2021.01.01  1.62507553100586   1.03835678100586  2.60866928100586
## 2 X2021.01.02  13.3995737075806   12.3858041763306  14.2393198013306
## 3 X2021.01.03  4.90297966003418   3.98139762878418  5.40229606628418
## 4 X2021.01.04  1.18881988525391 -0.510887145996094  2.53403472900391
## 5 X2021.01.05 -5.39001960754395  -6.41169929504395 -4.32380867004395
## 6 X2021.01.06 -10.1598304748535  -10.3247718811035 -9.93317031860352
##         names         mean_wind          min_wind          max_wind
## 1 X2021.01.01  5.45678126017253  2.56863021850586  7.00613021850586
## 2 X2021.01.02  11.8261691411336  9.40728950500488  13.8184213638306
## 3 X2021.01.03  3.47338981628418  2.34663200378418  4.80463981628418
## 4 X2021.01.04  3.07706858317057  2.32114410400391  3.48325347900391
## 5 X2021.01.05 -3.09281908671061 -4.70564460754395 -1.17439460754395
## 6 X2021.01.06 -8.94026629130046 -10.4019203186035  -4.1235990524292

3.3 Calculate across and along shore winds by week

Angles/directions are probably not reliable yet - have to ground truth

week region v mean u mean wind magnitude wind blowing to coarse angle coast angle adjusted angle new angle new wind blowing to longshore wind crossshore wind check magnitude
1 North 3.026 -0.357 3.047 northwest 1.453 0.785 1.688 2.474 up_towards 2.392 -1.887 TRUE
1 South 1.578 0.631 1.699 northeast 1.190 0.785 1.190 1.976 up_towards 0.670 -1.562 TRUE
2 North -0.094 3.338 3.339 southeast 0.028 0.785 6.255 0.757 up_away 2.427 2.294 TRUE
2 South -2.115 3.345 3.958 southeast 0.564 0.785 5.719 0.222 up_away 3.861 0.870 TRUE
3 North 2.150 -4.333 4.837 northwest 0.461 0.785 2.681 3.466 down_towards -4.584 -1.544 TRUE
3 South 2.550 -1.892 3.175 northwest 0.932 0.785 2.209 2.995 up_towards 3.141 -0.465 TRUE

3.3.1 Try plotting to see if things look correct

4 Monthly data

4.1 Extract mean wind by month

4.1.1 v wind

4.1.1.1 Read in wind data

# use ecopull function
vwind <- ecopull::nc_to_raster(nc = here::here("data-raw/vwnd.10m.mon.mean.nc"),
                               varname = "vwnd",
                               show_images = TRUE) 

vwind <- raster::rotate(vwind)
raster::plot(vwind)

4.1.1.2 Mask to relevant strata

m_vwind <- raster::mask(x = vwind, 
                        mask = large_geom)
mean(m_vwind@data@values, na.rm = TRUE)
## [1] -0.1615039
m_vwind[[1]]
## class      : RasterLayer 
## dimensions : 30, 20, 600  (nrow, ncol, ncell)
## resolution : 1.031519, 0.6498195  (x, y)
## extent     : -80.45845, -59.82808, 30.21661, 49.71119  (xmin, xmax, ymin, ymax)
## crs        : +proj=longlat +lat_0=40 +lon_0=-77 +x_0=0 +y_0=0 +datum=NAD83 +no_defs +ellps=GRS80 +towgs84=0,0,0 
## source     : memory
## names      : X1979.01.01 
## values     : -0.188582, 2.251501  (min, max)
## time       : 1979-01-01
raster::plot(m_vwind)

4.1.1.2.1 Plot over map

4.1.2 u wind

4.1.2.1 Read in wind data

# use ecopull function
uwind <- ecopull::nc_to_raster(nc = here::here("data-raw/uwnd.10m.mon.mean.nc"),
                               varname = "uwnd",
                               show_images = TRUE) 

uwind <- raster::rotate(uwind)
raster::plot(uwind)

4.1.2.2 Mask to relevant strata

m_uwind <- raster::mask(x = uwind, 
                        mask = large_geom)
mean(m_uwind@data@values, na.rm = TRUE)
## [1] 2.585091
m_uwind[[1]]
## class      : RasterLayer 
## dimensions : 30, 20, 600  (nrow, ncol, ncell)
## resolution : 1.031519, 0.6498195  (x, y)
## extent     : -80.45845, -59.82808, 30.21661, 49.71119  (xmin, xmax, ymin, ymax)
## crs        : +proj=longlat +lat_0=40 +lon_0=-77 +x_0=0 +y_0=0 +datum=NAD83 +no_defs +ellps=GRS80 +towgs84=0,0,0 
## source     : memory
## names      : X1979.01.01 
## values     : 0.6709892, 1.908766  (min, max)
## time       : 1979-01-01
raster::plot(m_uwind)

4.1.2.2.1 Plot over map

4.1.3 Calculate monthly mean u and v wind

4.1.3.1 v wind

Break into north and south regions at 39N (approximately the bottom of NJ)

Positive v wind = wind is blowing to the north

##         names          mean_wind           min_wind           max_wind
## 1 X1979.01.01   2.03434200286865    1.6679892539978   2.25150108337402
## 2 X1979.02.01  -2.61082348823547  -3.20551514625549  -2.16903352737427
## 3 X1979.03.01   1.78748390674591   1.65858399868011   1.87497127056122
## 4 X1979.04.01  -2.72354888916016  -3.43132877349854  -1.65548253059387
## 5 X1979.05.01 -0.771568644046783 -0.905924737453461 -0.616295218467712
## 6 X1979.06.01   2.62528488636017   2.42658042907715   2.83055186271667
##         names          mean_wind           min_wind          max_wind
## 1 X1979.01.01  0.699965926508109  -0.18858203291893  1.67570722103119
## 2 X1979.02.01  -3.28942049344381   -3.6595470905304  -2.9193127155304
## 3 X1979.03.01   1.42110284566879  0.730975568294525  1.87005698680878
## 4 X1979.04.01  -3.04131368001302  -3.55112051963806 -1.95717525482178
## 5 X1979.05.01 -0.222826617552588 -0.614342093467712 0.191290482878685
## 6 X1979.06.01   3.07070374488831   2.58722496032715  3.56281089782715

4.1.3.1.1 Test correlation with recruitment index from the 2019 assessment model

4.1.3.2 u wind

Positive u wind = wind is blowing to the east

##         names          mean_wind          min_wind           max_wind
## 1 X1979.01.01   1.45269603729248  1.29819440841675   1.57005679607391
## 2 X1979.02.01   2.63577941656113  1.98740470409393   3.57330727577209
## 3 X1979.03.01   4.12896010875702  3.96217894554138   4.27426958084106
## 4 X1979.04.01 -0.956579941511154 -1.30267691612244 -0.527709543704987
## 5 X1979.05.01  0.362831687927246 0.299994617700577  0.479556113481522
## 6 X1979.06.01   3.60882782936096  3.23824834823608   3.94925093650818
##         names         mean_wind           min_wind          max_wind
## 1 X1979.01.01  1.38577417532603  0.670989215373993  1.90876638889313
## 2 X1979.02.01  3.35631279945374   1.98196387290955  5.00613355636597
## 3 X1979.03.01  2.57121164798737   1.23079669475555  3.95357894897461
## 4 X1979.04.01 0.616446284453074 -0.510847508907318  1.37352740764618
## 5 X1979.05.01 0.527386673291524  0.396705806255341 0.648249387741089
## 6 X1979.06.01  2.52984784444173   1.16936814785004  3.22574830055237

4.1.3.2.1 Test correlation with recruitment index from the 2019 assessment model

4.1.4 Rotate

4.1.4.1 Determine rotation angle

Angle from north: 0.7853982 (pi / 4)

4.1.4.2 Do the rotation

names u mean Year DOY week region month v mean wind magnitude ns ew wind blowing to coarse angle coast angle adjusted angle new angle new wind blowing to longshore wind crossshore wind check magnitude
1979.01.01 1.453 1979 1979-01-01 1 North 1 2.034 2.500 north east northeast 0.951 0.785 0.951 1.736 up_towards 0.411 -2.466 TRUE
1979.02.01 2.636 1979 1979-02-01 5 North 2 -2.611 3.710 south east southeast 0.781 0.785 5.503 0.005 up_away 3.710 0.018 TRUE
1979.03.01 4.129 1979 1979-03-01 9 North 3 1.787 4.499 north east northeast 0.408 0.785 0.408 1.194 up_away 1.656 4.183 TRUE
1979.04.01 -0.957 1979 1979-04-01 13 North 4 -2.724 2.887 south west southwest 1.233 0.785 4.375 5.160 down_away -1.249 2.603 FALSE
1979.05.01 0.363 1979 1979-05-01 18 North 5 -0.772 0.853 south east southeast 1.131 0.785 5.152 5.937 down_away -0.803 0.289 TRUE
1979.06.01 3.609 1979 1979-06-01 22 North 6 2.625 4.463 north east northeast 0.629 0.785 0.629 1.414 up_away 0.696 4.408 TRUE

Alongshore wind (positive = going up the coast)

Across shore wind (positive = going away from the coast)

4.1.4.2.1 Test correlation with recruitment index from the 2019 assessment model

4.1.4.2.2 Try GLMs

Poisson:

## 
## Call:
## glm(formula = Recruitment ~ 1, family = "poisson", data = dat)
## 
## Deviance Residuals: 
##     Min       1Q   Median       3Q      Max  
## -2827.9  -1506.9   -333.6    856.8   6709.6  
## 
## Coefficients:
##              Estimate Std. Error z value Pr(>|z|)    
## (Intercept) 1.765e+01  2.558e-05  690127   <2e-16 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## (Dispersion parameter for poisson family taken to be 1)
## 
##     Null deviance: 127825358  on 32  degrees of freedom
## Residual deviance: 127825358  on 32  degrees of freedom
## AIC: 127826002
## 
## Number of Fisher Scoring iterations: 4
## 
## Call:
## glm(formula = eqn, family = "poisson", data = dat)
## 
## Deviance Residuals: 
##     Min       1Q   Median       3Q      Max  
## -3061.4  -1022.8   -399.2   1038.8   5513.3  
## 
## Coefficients:
##                               Estimate Std. Error   z value Pr(>|z|)    
## (Intercept)                  1.771e+01  4.528e-05 391177.00   <2e-16 ***
## crossshore_wind_April_North  2.970e-02  2.195e-05   1352.95   <2e-16 ***
## crossshore_wind_May_North    2.938e-02  2.281e-05   1288.39   <2e-16 ***
## crossshore_wind_April_South -7.030e-02  3.502e-05  -2007.54   <2e-16 ***
## crossshore_wind_May_South   -8.964e-04  2.867e-05    -31.26   <2e-16 ***
## longshore_wind_April_North  -1.889e-02  1.606e-05  -1176.00   <2e-16 ***
## longshore_wind_May_North     5.135e-02  2.525e-05   2033.39   <2e-16 ***
## longshore_wind_April_South  -3.122e-02  1.904e-05  -1639.45   <2e-16 ***
## longshore_wind_May_South    -5.242e-02  2.906e-05  -1804.21   <2e-16 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## (Dispersion parameter for poisson family taken to be 1)
## 
##     Null deviance: 127825358  on 32  degrees of freedom
## Residual deviance: 102120229  on 24  degrees of freedom
## AIC: 102120889
## 
## Number of Fisher Scoring iterations: 4
##      df       AIC
## mod1  9 102120889
## mod0  1 127826002

Negative binomial:

##  Family: nbinom2  ( log )
## Formula:          Recruitment ~ 1
## Data: dat
## 
##      AIC      BIC   logLik deviance df.resid 
##   1176.8   1179.8   -586.4   1172.8       31 
## 
## 
## Dispersion parameter for nbinom2 family (): 12.8 
## 
## Conditional model:
##             Estimate Std. Error z value Pr(>|z|)    
## (Intercept) 17.65115    0.04869   362.5   <2e-16 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##  Family: nbinom2  ( log )
## Formula:          
## Recruitment ~ crossshore_wind_April_North + crossshore_wind_May_North +  
##     crossshore_wind_April_South + crossshore_wind_May_South +  
##     longshore_wind_April_North + longshore_wind_May_North + longshore_wind_April_South +  
##     longshore_wind_May_South
## Data: dat
## 
##      AIC      BIC   logLik deviance df.resid 
##   1185.0   1200.0   -582.5   1165.0       23 
## 
## 
## Dispersion parameter for nbinom2 family (): 16.1 
## 
## Conditional model:
##                              Estimate Std. Error z value Pr(>|z|)    
## (Intercept)                 17.718932   0.078949  224.44   <2e-16 ***
## crossshore_wind_April_North  0.035028   0.037882    0.92    0.355    
## crossshore_wind_May_North    0.021936   0.036552    0.60    0.548    
## crossshore_wind_April_South -0.072945   0.060861   -1.20    0.231    
## crossshore_wind_May_South    0.001085   0.044455    0.02    0.981    
## longshore_wind_April_North  -0.023728   0.028939   -0.82    0.412    
## longshore_wind_May_North     0.046580   0.041739    1.12    0.264    
## longshore_wind_April_South  -0.025401   0.033836   -0.75    0.453    
## longshore_wind_May_South    -0.044873   0.046434   -0.97    0.334    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##      df      AIC
## mod0  2 1176.787
## mod1 10 1185.029